home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD001b.dsk
/
REMFM.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
13KB
|
367 lines
5 REM REMFM (REMINDER FILE MAINT)
9 TH = 1000:W = 1:Z = 0
10 D$ = CHR$(4)
11 GOSUB 7000: GOTO 15
12 IF YY <70 THEN YY = YY +100
13 Y4 = YY/4:I4 = INT(Y4):CD = (YY *365) +I4 +DD: IF I4 = Y4 AND MM <3 THEN CD = CD -W
14 CD = CD +VD(MM):DW$ = VD$(CD -( INT(CD/7) *7)): RETURN
15 ONERR GOTO 9000
20 PRINT D$"OPEN "NF$",L"RL
30 PRINT D$"READ "NF$",R0"
50 INPUT H1: INPUT L1: INPUT CD$: INPUT BD$
51 H1 = H1 -1000
52 L1 = L1 -1000
55 POKE 216,0
105 PRINT D$
106 HOME
138 IF JH$ = "S" GOTO 150
139 IF JH$ = "A" GOTO 150
140 INPUT "WANT TO ADD A NEW RECORD? (Y OR N)? ";R$
143 JH$ = "A"
144 IF R$ = "Y" GOTO 150
145 IF R$ < >"N" GOTO 140
146 GOSUB 9400: PRINT "DO YOU WANT TO SEARCH FOR AN": INPUT "EXISTING RECORD? Y OR N)? ";R$
147 IF R$ = "N" GOTO 9500
148 IF R$ < >"Y" GOTO 146
149 GOSUB 9400:JH$ = "S"
150 INPUT " TARGET YEAR ";RR:YY = RR
152 IF RR < > INT(RR) OR RR <Z OR RR >99 GOTO 150
153 A$ = STR$(RR): IF LEN(A$) = W THEN A$ = "0" +A$
154 INPUT "TARGET MONTH ";RR:MM = RR: IF INT(RR) < >RR OR RR <1 OR RR >12 GOTO 154
155 A$ = A$ + STR$(RR): IF LEN(A$) = 3 THEN A$ = LEFT$(A$,2) +"0" + RIGHT$(A$,W)
156 INPUT " TARGET DAY ";RR:DD = RR
157 IF RR < > INT(RR) OR RR <W OR RR >31 GOTO 156
158 A$ = A$ + STR$(RR): IF LEN(A$) = 5 THEN A$ = LEFT$(A$,4) +"0" + RIGHT$(A$,1)
159 IF JH$ = "S" GOTO 163
160 A$ = A$ +"." + STR$( INT( RND(1) *899) +100): GOTO 170
163 INPUT "3 DIGIT SUFFIX ";RR
164 IF RR < > INT(RR) OR RR >999 OR RR <Z GOTO 163
165 A$ = A$ +"." + STR$(RR): IF LEN(A$) = 8 THEN A$ = LEFT$(A$,7) +"00" + RIGHT$(A$,W)
166 IF LEN(A$) = 9 THEN A$ = LEFT$(A$,8) +"0" + RIGHT$(A$,W)
168 IF JH$ = "S" GOTO 200
170 GOSUB 12: PRINT DL$: PRINT DW$;" ";DD;" ";MO$(MM);" ";YY: PRINT : INPUT "RIGHT? (Y OR N)? ";R$
180 IF R$ = "Y" GOTO 200
185 IF R$ < >"N" GOTO 170
190 GOSUB 9400: GOTO 150
200 PRINT D$"READ "NF$",R"H1
201 INPUT B:R = B -TH
202 PRINT D$"READ "NF$",R"R
203 INPUT B:B = B -TH: INPUT F:F = F -TH: INPUT A1$
204 IF A1$ <A$ GOTO 400
205 UM = INT((L1 ^.5) -(L1 ^.25)) +W:NR = Z:L = W:LA$ = "0": PRINT D$: HOME : PRINT "*** BE PATIENT ***"
206 PRINT "FILE HAS ";L1 -2;" RECORDS"
210 NR = NR +W: IF NR >UM GOTO 280
220 R = W + INT( RND(W) *(L1 -W))
230 PRINT D$"READ "NF$",R"R
240 INPUT B: INPUT F: INPUT A1$
250 IF F = TH GOTO 210
260 IF A1$ >A$ GOTO 210
270 IF A1$ >LA$ GOTO 272
271 GOTO 210
272 L = R:LA$ = A1$: GOTO 210
280 R = L
290 PRINT D$"READ "NF$",R"R
300 INPUT B:B = B -TH: INPUT F:F = F -TH: INPUT A1$
310 IF A1$ = A$ GOTO 5000
320 IF A1$ >A$ GOTO 540
330 R = F:PB = B: GOTO 290
400 PB = B:B = R:R = H1: PRINT D$: HOME
540 PRINT D$: HOME
560 PRINT NZ$(W);" ";: INVERSE : PRINT A$;: NORMAL : PRINT " NOT FOUND"
565 IF JH$ = "S" GOTO 750
620 GOSUB 4000:F = R:R = AR:A1$ = A$: GOTO 5030
750 GOSUB 9450
755 IF A1$ < >"^" GOTO 757
756 R = B
757 IF R = 1 GOTO 9500
758 PRINT D$"READ "NF$",R";R
759 INPUT B:B = B -1000: INPUT F:F = F -1000: INPUT A1$:A$ = A1$
770 IF R = H1 GOTO 756
771 GOTO 5000
890 PRINT D$"READ "NF$",R"H1
900 INPUT HB: INPUT PD
910 PRINT D$"WRITE "NF$",R"R
920 PRINT PD: PRINT TH
930 PRINT D$"WRITE "NF$",R"H1
940 PRINT HB: PRINT R +TH:PB = B:R = F
950 PRINT D$"WRITE "NF$",R"R
960 PRINT PB +TH
970 PRINT D$"READ "NF$",R"PB
980 INPUT B
990 PRINT D$"WRITE "NF$",R"PB
1000 PRINT B: PRINT R +TH
1002 PRINT D$"CLOSE "NF$
1004 PRINT D$"OPEN "NF$",L"RL
1010 PRINT D$
1020 HOME
1030 PRINT NZ$(W);" ";A$;" DELETED"
1035 GOSUB 9450
1036 JH$ = " "
1040 GOTO 105
4000 FZ$(W) = A$
4010 YN$ = "N":SW = 0
4020 I = 1: GOTO 4030
4025 SW = 1
4030 I = I +1
4040 IF I >NF GOTO 4440
4050 IF RZ$(I) = YN$ GOTO 4025
4060 GOSUB 9400
4061 PRINT NZ$(I); TAB( 14);
4070 IF TZ$(I) = "N" GOTO 4330
4080 INPUT I$
4090 IF LEN(I$) >LZ(I) GOTO 4310
4100 IF LEN(I$) = 0 GOTO 4270
4110 IF VZ(I) = 0 GOTO 4260
4120 J = INT(VZ(I)/1000)
4130 K = VZ(I) -(J *1000)
4140 IF I$ = VZ$(J) GOTO 4260
4150 J = J +1
4160 IF J >K GOTO 4180
4170 GOTO 4140
4180 J = INT(VZ(I)/1000)
4190 GOSUB 9400
4200 PRINT "*** VALID VALUES ARE ***"
4210 PRINT TAB( 15);
4220 PRINT VZ$(J); TAB( 26);MZ$(J)
4230 J = J +1: IF J >K GOTO 4060
4240 GOTO 4210
4260 FZ$(I) = I$: GOTO 4030
4270 IF DZ(I) >1000 GOTO 4300
4280 J = DZ(I)
4285 FZ$(I) = SZ$(J): GOTO 4030
4300 J = DZ(I) -1000
4305 FZ$(I) = DZ$(J): GOTO 4030
4310 PRINT "*** MAX LENGTH IS ";LZ(I): GOTO 4060
4330 INPUT J
4390 IF J <LZ(I) GOTO 4430
4400 IF J >VZ(I) GOTO 4420
4410 FZ$(I) = STR$(J): GOTO 4030
4420 PRINT "*** MAX IS"; TAB( 15);VZ(I): GOTO 4060
4430 PRINT "*** MIN IS"; TAB( 15);LZ(I): GOTO 4060
4440 IF YN$ = "Y" GOTO 4640
4445 IF SW = 0 GOTO 4640
4450 GOSUB 9400
4460 PRINT "*** THAT'S ALL THE REQUIRED DATA ***"
4470 INPUT "*** WANT THE REST TO DEFAULT?";R$
4480 IF R$ = "Y" GOTO 4520
4490 IF R$ = "N" GOTO 4510
4500 PRINT "*** REPLY Y OR N": GOTO 4470
4510 YN$ = "Y": GOTO 4020
4520 I = 1
4530 I = I +1
4540 IF I >NF GOTO 4640
4550 IF RZ$(I) = "Y" GOTO 4530
4560 IF TZ$(I) = "N" GOTO 4620
4580 J = DZ(I)
4590 FZ$(I) = SZ$(J): GOTO 4530
4600 J = DZ(I) -1000
4610 FZ$(I) = DZ$(J): GOTO 4530
4620 J = DZ(I)
4630 FZ$(I) = STR$(J): GOTO 4530
4640 PRINT D$"READ "NF$",R"H1
4645 INPUT HB: INPUT PD: IF PD = TH GOTO 4680
4650 AR = PD -TH
4660 PRINT D$"READ "NF$",R"AR
4665 INPUT PD
4670 PRINT D$"WRITE "NF$",R"H1
4675 PRINT HB: PRINT PD: GOTO 4695
4680 L1 = L1 +W:AR = L1
4685 PRINT D$"WRITE "NF$",R0"
4690 PRINT H1 +TH: PRINT L1 +TH
4695 PRINT D$"WRITE "NF$",R"AR
4700 PRINT B +TH: PRINT R +TH: PRINT A$:I = W
4705 I = I +W: IF I >NF GOTO 4715
4710 PRINT FZ$(I): GOTO 4705
4715 PRINT D$"WRITE "NF$",R"R
4720 PRINT AR +TH
4725 PRINT D$"WRITE "NF$",R"B
4730 PRINT PB +TH: PRINT AR +TH
4762 PRINT D$"CLOSE "NF$
4764 PRINT D$"OPEN "NF$",L"RL
4790 PRINT D$: RETURN
5000 FZ$(W) = A$:I = W
5010 I = I +1: IF I >NF GOTO 5030
5020 INPUT FZ$(I): GOTO 5010
5030 PRINT D$:I = 1: GOTO 5310
5050 I = I +1:J = J +1: IF I >NF GOTO 5320
5060 IF J >9 GOTO 5320
5070 PRINT J;" ";NZ$(I); TAB( 16);
5080 IF TZ$(I) = "N" GOTO 5100
5090 IF LEN(FZ$(I)) >24 GOTO 5180
5100 INVERSE : PRINT FZ$(I);: NORMAL : IF TZ$(I) = "C" GOTO 5130
5110 PRINT
5120 GOSUB 9400: GOTO 5050
5130 IF VZ(I) = O GOTO 5110
5140 X = INT(VZ(I)/1000):Y = VZ(I) -(X *1000)
5150 IF FZ$(I) = VZ$(X) GOTO 5170
5160 X = X +1: IF X >Y GOTO 5110
5165 GOTO 5150
5170 PRINT TAB( 24);: INVERSE : PRINT MZ$(X): NORMAL : GOTO 5120
5180 Y = LEN(FZ$(I)) -24:X$ = LEFT$(FZ$(I),24)
5190 Y$ = RIGHT$(FZ$(I),Y): INVERSE : PRINT X$: NORMAL
5200 PRINT "---------------------------------";: INVERSE : PRINT Y$: NORMAL
5210 GOTO 5050
5250 IF R$ = "D" GOTO 5900
5260 IF R$ >"0" GOTO 5300
5275 GOTO 5670
5300 IF R$ <":" GOTO 5400
5305 GOTO 5670
5310 HOME : PRINT TAB( 13);W + INT((I -W)/9);" OF "; INT((NF +7)/9);" ";NF$
5311 B$ = LEFT$(FZ$(W),23)
5312 PRINT " ";NZ$(W); TAB( 16);: INVERSE : PRINT B$: NORMAL
5314 J = 0: GOSUB 9400: GOTO 5050
5320 IF R1$ = "C" GOTO 5720
5330 PRINT " S=SEARCH FOR NEW ";NZ$(W)
5331 PRINT "1-9=CHANGE DATA A=ADD Q=QUIT"
5335 PRINT " M=MORE N=NXT P=PRV C=CPY D=DEL ";: INPUT R$
5338 IF R$ = "Q" GOTO 9500
5340 IF R$ = "M" GOTO 5720
5350 IF R$ = "N" GOTO 5750
5360 IF R$ = "P" GOTO 5800
5365 IF R$ = "S" THEN JH$ = "S"
5370 IF R$ = "S" GOTO 105
5380 IF R$ = "C" GOTO 5850
5385 IF R$ = "A" THEN JH$ = "A"
5386 IF R$ = "A" GOTO 105
5390 GOTO 5250
5400 G = VAL(R$): IF G >J -1 GOTO 5700
5401 IF G < > INT(G) GOTO 5712
5403 G = G +1 +(9 * INT((I -3)/9))
5405 GOSUB 9400
5410 PRINT " ";NZ$(G); TAB( 15);
5420 IF TZ$(G) = "N" GOTO 5620
5430 INPUT I$
5440 IF LEN(I$) >LZ(G) GOTO 5610
5450 IF VZ(G) = 0 GOTO 5540
5460 J = INT(VZ(G)/1000):K = VZ(G) -(J *1000)
5470 IF I$ = VZ$(J) GOTO 5540
5480 J = J +1: IF J >K GOTO 5490
5485 GOTO 5470
5490 J = INT(VZ(G)/1000): GOSUB 9400
5500 PRINT "*** VALID VALUES ARE ***"
5510 PRINT TAB( 16);VZ$(J); TAB( 24);MZ$(J)
5520 J = J +1: IF J >K GOTO 5530
5525 GOTO 5510
5530 GOSUB 9400: GOTO 5410
5540 FZ$(G) = I$
5560 PRINT D$"WRITE "NF$",R"R
5570 PRINT B +1000: PRINT F +1000: PRINT A$:Q1 = 1
5580 Q1 = Q1 +1: IF Q1 >NF GOTO 5600
5590 PRINT FZ$(Q1): GOTO 5580
5592 PRINT D$"CLOSE "NF$
5594 PRINT D$"OPEN "NF$",L"RL
5600 PRINT D$
5602 IF I <3 GOTO 5030
5605 I = 1 +(9 * INT((I -3)/9)): GOTO 5310
5610 PRINT "***MAX LENGTH IS ";LZ(G): GOTO 5530
5620 INPUT J: IF J <LZ(G) GOTO 5660
5630 IF J >VZ(G) GOTO 5650
5640 FZ$(G) = STR$(J): GOTO 5560
5650 PRINT "***MAX IS ";VZ(G): GOTO 5530
5660 PRINT "*** MIN IS ";LZ(G): GOTO 5530
5670 HOME : PRINT "*** BAD RESPONSE, ENTER AGAIN ***"
5680 GOSUB 9450: GOTO 5600
5700 HOME : PRINT "*** MAX CHANGE NBR ON THIS SCREEN IS ";J -1
5710 GOSUB 9450: GOTO 5600
5712 HOME : PRINT "*** MUST BE WHOLE NUMBER": GOSUB 9450: GOTO 5600
5720 IF I < = NF GOTO 5740
5725 IF R1$ < >"C" GOTO 5030
5730 PRINT D$"PR#0"
5735 R1$ = "B": GOTO 5030
5740 I = I -1: GOTO 5310
5750 IF F = H1 GOTO 5790
5760 R = F
5765 PRINT D$"READ "NF$",R"R
5770 INPUT B: INPUT F: INPUT A1$:A$ = A1$
5780 B = B -1000:F = F -1000: GOTO 5000
5790 HOME : PRINT "*** THAT WAS LAST RECORD ON FILE"
5795 GOSUB 9450: GOTO 5600
5800 IF B = 1 GOTO 5830
5810 R = B: GOTO 5765
5830 HOME : PRINT "*** THAT WAS FIRST RECORD ON FILE"
5840 GOSUB 9450: GOTO 5600
5850 HOME : INPUT "*** TURN ON PRINTER & HIT RETURN";R$
5860 PRINT D$"PR#1"
5870 R1$ = "C": PRINT : GOTO 5030
5900 GOSUB 9400: PRINT "SURE YOU WANT TO DELETE THIS ONE";
5910 INPUT R$
5920 IF R$ = "Y" GOTO 890
5930 GOTO 5600
7000 NF$ = "REMINDER":RL = 142:NF = 13:NV = 37:ND = W:NS = 5
7005 DIM NZ$(NF),TZ$(NF),RZ$(NF),LZ(NF),DZ$(W),SZ$(5),DZ(NF),VZ$(NV),MZ$(NV),VZ(NF)
7007 DIM FZ$(NF)
7010 FOR I = W TO 13:TZ$(I) = "N":RZ$(I) = "N":LZ(I) = Z:DZ(I) = Z:VZ(I) = 99: NEXT
7020 NZ$(W) = "TARGET-DATE"
7030 NZ$(2) = "NOTE-1"
7040 NZ$(3) = "NOTE-2"
7050 NZ$(4) = "NOTE-3"
7060 NZ$(5) = "FREQUENCY"
7070 NZ$(6) = "YEARS-PRIOR"
7080 NZ$(7) = "MONTHS-PRIOR"
7090 NZ$(8) = "WEEKS-PRIOR"
7100 NZ$(9) = "DAYS-PRIOR"
7110 NZ$(10) = "DAYS-AFTER"
7120 NZ$(11) = "WEEKS-AFTER"
7130 NZ$(12) = "MONTHS-AFTER"
7140 NZ$(13) = "YEARS-AFTER"
7150 FOR I = W TO 5:TZ$(I) = "C":RZ$(I) = "Y":LZ(I) = 30:VZ(I) = Z:SZ$(I) = " ": NEXT
7160 LZ(W) = 10:LZ(5) = 3:DZ$(W) = "990101.000":SZ$(4) = "S":DZ(W) = 1001:DZ(2) = W:DZ(3) = 2:DZ(4) = 3:DZ(5) = 4:VZ(5) = 1037
7180 FOR I = W TO 4: FOR J = W TO 7
7190 IF J = W THEN IJ$ = "MON"
7200 IF J = 2 THEN IJ$ = "TUE"
7210 IF J = 3 THEN IJ$ = "WED"
7220 IF J = 4 THEN IJ$ = "THR"
7230 IF J = 5 THEN IJ$ = "FRI"
7240 IF J = 6 THEN IJ$ = "SAT"
7250 IF J = 7 THEN IJ$ = "SUN"
7260 VZ$((7 *(I -W)) +J) = STR$(I) + LEFT$(IJ$,2)
7270 IF I = 1 THEN JI$ = "1ST-"
7280 IF I = 2 THEN JI$ = "2ND-"
7290 IF I = 3 THEN JI$ = "3RD-"
7300 IF I = 4 THEN JI$ = "4TH-"
7310 MZ$((7 *(I -W)) +J) = JI$ +IJ$
7315 NEXT J: NEXT I
7320 VZ$(29) = "A":VZ$(30) = "T":VZ$(31) = "Q":VZ$(32) = "E":VZ$(33) = "M":VZ$(34) = "B":VZ$(35) = "W":VZ$(36) = "D":VZ$(37) = "S"
7340 MZ$(29) = "ANNUAL"
7350 MZ$(30) = "TWICE-A-YEAR"
7360 MZ$(31) = "QUARTERLY"
7370 MZ$(32) = "EVERY-OTH-MO"
7380 MZ$(33) = "MONTHLY"
7390 MZ$(34) = "BI-MONTHLY"
7400 MZ$(35) = "WEEKLY"
7410 MZ$(36) = "DAILY"
7420 MZ$(37) = "SPECIFIC-DTE"
7430 DIM VD$(6):VD$(0) = "SUN":VD$(1) = "MON":VD$(2) = "TUE":VD$(3) = "WED":VD$(4) = "THR":VD$(5) = "FRI":VD$(6) = "SAT"
7435 DIM MO$(12):MO$(1) = "JAN":MO$(2) = "FEB":MO$(3) = "MAR":MO$(4) = "APR":MO$(5) = "MAY":MO$(6) = "JUN":MO$(7) = "JUL":MO$(8) = "AUG":MO$(9) = "SEP":MO$(10) = "OCT":MO$(11) = "NOV":MO$(12) = "DEC"
7440 DIM VD(13):VD(1) = 0:VD(2) = 31:VD(3) = 59:VD(4) = 90:VD(5) = 120:VD(6) = 151:VD(7) = 181:VD(8) = 212:VD(9) = 243:VD(10) = 273:VD(11) = 304:VD(12) = 334:VD(13) = 365
7450 RETURN
9000 PRINT D$
9005 POKE 216,0
9010 HOME
9020 INVERSE : PRINT NF$;: NORMAL : PRINT " NOT MOUNTED"
9030 PRINT "DO YOU WANT TO CREATE A NEW ";: INVERSE : PRINT NF$;: NORMAL : INPUT R$
9050 IF R$ = "N" GOTO 9090
9060 IF R$ = "Y" GOTO 9130
9070 PRINT "REPLY Y OR N"
9080 GOTO 9010
9090 HOME
9100 PRINT "MOUNT DISKETTE WITH ";NF$;" AND RERUN"
9120 GOTO 9999
9130 BD$ = "800101":CD$ = " "
9174 PRINT D$"DELETE "NF$
9176 PRINT D$"OPEN "NF$",L"RL
9178 PRINT D$"WRITE "NF$",R0"
9180 PRINT 1002: PRINT 1002: PRINT CD$: PRINT BD$: PRINT FT$
9190 PRINT D$"WRITE "NF$",R1"
9200 PRINT 1000: PRINT 1002: PRINT "0"
9210 PRINT D$"WRITE "NF$",R2"
9220 PRINT 1001: PRINT 1000: PRINT "^"
9230 PRINT D$
9240 GOTO 30
9400 PRINT "---------------------------------------": RETURN
9450 Q3 = 0
9460 Q3 = Q3 +1: IF Q3 >50 GOTO 9480
9470 GOTO 9460
9480 RETURN
9500 PRINT D$"CLOSE "NF$
9999 PRINT D$"RUN REMLO"